home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE23 / PZAZZDEM / PZAZZDEM.ZIP / PZDEMO / PZDLABEL.PAS < prev    next >
Pascal/Delphi Source File  |  1996-12-13  |  2KB  |  67 lines

  1. unit PZDLabel;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, ExtCtrls, PZBPanel, PZShaded, StdCtrls, PZLabel, PZSpButt;
  8.  
  9. type
  10.   TPZLabelForm = class(TForm)
  11.     HeaderPanel: TPZBitmapPanel;
  12.     PZShaded1: TPZShaded;
  13.     DescrPanel: TPZBitmapPanel;
  14.     PZLabel3: TPZLabel;
  15.     PZLabel4: TPZLabel;
  16.     ResultsPanel: TPZBitmapPanel;
  17.     PZLabel5: TPZLabel;
  18.     PZLabel2: TPZLabel;
  19.     OutputPanel: TPZBitmapPanel;
  20.     ResultsLabel: TPZLabel;
  21.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  22.     procedure FormCreate(Sender: TObject);
  23.     procedure FormDeactivate(Sender: TObject);
  24.   private
  25.     { Private declarations }
  26.   public
  27.     { Public declarations }
  28.   end;
  29.  
  30. var
  31.   PZLabelForm: TPZLabelForm;
  32.  
  33. implementation
  34.  
  35. Uses PZDMain;
  36.  
  37. {$R *.DFM}
  38.  
  39. Const
  40.   ExampleText ='Text can be \BBold, \n\IItalic,\n or \UUnderlined\n and can include\lb\lbline breaks\lb\lb '+
  41.                'and can have individualy \B\cRedwords\cn\n or \B\cBluel\cGreene\cRedt\cTealt\cMaroone\cOliver\cPurples\cn\n '+
  42.                'in different colors.\lb\lb\lb\lb\B\UAll in one label!';
  43.               
  44. procedure TPZLabelForm.FormCreate(Sender: TObject);
  45.  
  46. Begin
  47.   SetBounds(10,10,MainForm.ClientWidth-20,MainForm.ClientHeight-MainForm.MainPanel.Height-20);
  48.   HeaderPanel.Background.LoadBitmap('PZD_STONE');
  49.   DescrPanel.Background.LoadBitmap('PZD_STONE');
  50.   ResultsPanel.Background.LoadBitmap('PZD_STONE');
  51.   OutputPanel.Background.LoadBitmap('PZD_STONE');
  52.   ResultsLabel.Caption:=ExampleText;
  53. End;
  54.  
  55. procedure TPZLabelForm.FormClose(Sender: TObject; var Action: TCloseAction);
  56.  
  57. Begin
  58.   Action:=caFree;
  59. End;
  60.  
  61. procedure TPZLabelForm.FormDeactivate(Sender: TObject);
  62. begin
  63.   Close;
  64. end;
  65.  
  66. end.
  67.